<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      .box {
        width: 100vw;
        height: 100vh;
        background-color: orange;
      }
      .top {
        width: 5.2vw;
        height: 9.26vh;
        background-color: red;
        margin-left: 2.6vw;
      }
      .bottom {
        width: 5.2vw;
        height: 9.26vh;
        background-color: skyblue;
      }
      p {
        font-size: 2rem;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <div class="top"></div>
      <div class="bottom"></div>
    </div>
  </body>
</html>

<script>
  // vw 和 vh 是 css3 新增单位 ->IE8 以上
  // 视口宽度 和 视口高度
  // 1920px = 100vw  1px = 0.0520833vw
  // 100px =  5.2vw
  // 1080px = 100vh  1px = 0.0925925vh
  // 100px =  9.259vh
</script>
